<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8"/>
    <meta name="author" content="huaicheng151201@163.com"/>
    <meta name="keywords" content="HTML,PHP,SQL"/>
    <meta name="description" content=""/>
    <meta name="revised" content=""/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <meta http-equiv="Cache-Control" content="no-transform"/>
    <meta name="apple-touch-fullscreen" content="yes"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="viewport"
          content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui"/>
    <meta name="format-detection" content="telephone=no"/>
    <meta name="msapplication-tap-highlight" content="no"/>
    <title></title>
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/common.css">
    <link rel="stylesheet" href="css/details_header.css">
    <link rel="stylesheet" href="css/doard.css">
    <style>
        .dmui-banner-img{
            height: 200px;
        }
    </style>
</head>
<body style="background-color:#F5F5F5;">
    <header style="height: auto;"></header>
    <section style="margin-top: 42px;">
        <div id="banner" style="width:100%;border-radius:0;"></div>
        <section id="content-box">
            <p style="text-align: center">加载中...</p>
        </section>
    </section>
    <script src="js/jquery-1.12.0.min.js"></script>
    <script src="js/touch.0.2.14.min.js"></script>
    <script src="js/dmui-banner.js"></script>
    <script src="js/lib/template.min.js"></script>
    <script src="js/reqeust.js"></script>
    <script>
        var heardertxt = "美食详情页";
        var imgArr = '';
        $(function () {
            $("header").load("details_header.html");
            var id = $C.query().id;
            if(!id){
                $("#content-box").find("p").html("id缺失,访问路径错误!");
                return;
            }

            sendByUrl("/GetFoodHotalSceneryDetail",{id:id},function (res) {
                var datas = [];
                if (res.hasValue == "true") {
                    imgArr = res.data.images.length > 0 && res.data.images[0];
                    for (var i = 0; i < res.data.images.length; i++) {
                        item = res.data.images[i];
                        datas.push({
                            title: "",
                            img: configCommon.pic + item,
                            href: ""
                        })
                    }
                    $("#content-box").html(template("content-temp",{data:res.data}));
                    // banner
                    $.banner({
                        id: "banner",
                        btnGroup: false, // 隐藏左右按钮组
                        data: datas
                    });
                    //var driver = getDriver(res.data.address);
                   // var driver = getDriver("天府五街地铁站");
                    $('body').on(clickevent,".delicious_btn",function () {
                        location.href = "daohang.html?adress="+res.data.address;
                    });
                }
                $(".share_open").removeClass("hide");
            });
            $("body").on("click",".share_item",function () {
                var id = $(this).attr("data-id"),
                        title = $(".detail_title").text(),
                        subtitle = $(".detail_content").text().substr(0,20),
                        url = imgArr || "http://www.ganzixinwen.com/uploads/file/2017/0602/20170602060904451.jpg";

                shareInfo(title,subtitle,location.href,url,id);
            });
        });
    </script>
<script type="text/html" id="content-temp" >
    <div class="delicious_title">
        <p class="detail_title">{{data.name}}</p>
        <p class="detail_content">
            {{#data.detail}}
        </p>
    </div>
    <div class="delicious_msg" style="padding-bottom:1rem;margin-bottom:0;">
        <p class="shop_msg">
            <span>商铺信息</span>
            <span><b></b>营业时间:{{data.OperateTime}}</span>
        </p>
        <p class="address_msg">
            <span>地址：{{data.address}}</span>
            <span class="hide"><b></b>距离:14KM</span>
        </p>
        <a href="tel:{{data.phone}}" class="phone_msg">
            <span>电话：{{data.phone}}</span>
            <span><b></b></span>
        </a>
        <p class="delicious_btn">
            <b></b>导航
        </p>
    </div>
</script>
</body>
</html>